<script setup>
import { CONST_VALUE, getEnumValue } from '@/utils/const';
import { computed } from 'vue';
const props = defineProps(['type', 'value']);
const item = computed(() => {
  let str = getEnumValue(props.type, props.value);
  try {
    CONST_VALUE[props.type];
  } catch (e) {}
  return str;
});
</script>
<template>
  <el-tag v-if="props.value !== undefined" :="item">{{
    item?.label || props.value
  }}</el-tag>
</template>